Conversation
…k connector restart
@mpeels can we put a |
| "kafka-connect", | ||
| "person-service") | ||
| // Add specific waits to ensure connectors are ready before test execution | ||
| .waitingFor("debezium", Wait.forLogMessage(".*Starting streaming.*", 1)) |
There was a problem hiding this comment.
Can we use the new healthchecks added to docker-compose for these waits?
@ericbuckley We can but that won't solve this issue. In this specific case the I believe (not tested) that if we change from the regex @mpeels it looks like the default value for metadata.max.age.ms is 5 minutes. I believe that means it only scans for new topics every 5 mins. I wonder if we lower that in the kafka-connect container, if it will look for new topics more often? environment:
CONNECT_CONNECTOR_CLIENT_CONFIG_OVERRIDE_POLICY: "All"
CONNECT_CONSUMER_METADATA_MAX_AGE_MS: 1000 |
Co-authored-by: Eric Buckley <eric.buckley@gmail.com>
Overview
Initial proof of concept for integration testing of RTR using TestContainers. The test added is very basic, it inserts a patient into the
NBS_ODSE.Persontable and verifies an entry with the appropriate ID is added to theRDB_Modern.D_PATIENTtable. Future testing is expected to be much more detailed.Docker Compose Changes
In order to have the
ComposeContainerleverage the existingdocker-compose.yaml, some modifications had to be made. Most notably thecontainer_nameparameter is not supported so it had to be removed from the yaml. Health checks were also added to ensure smooth and consistent container startup.Connector Initialization and HealthChecks
For the Debezium and Kafka-connect containers to properly initialize their connector configurations,
healthcheck.shscripts were added. These scripts send a GET request to/connectorsto retrieve the list of active connectors. If the expected connectors are not present, a POST request is sent to initialize them.Known issues
The Kafka-connect container is configured to monitor topics using regex:
"topics.regex": "nrt_[a-zA-Z_]+". The issue with specifying a regex is that only topics that exist at the time of connector initialization will be monitored. This causes a problem because certain topics do not exist until thepost-processing-servicestarts. A temporary workaround is in place where the sink connector is restarted during the test execution.Command line test execution
Test execution is expected to take around 4 minutes. This might be slightly longer the first time due to container builds.
JIRA